<?php

//use Illuminate\Support\Facades\Schema;
use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOperationLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('operation_logs', function (Blueprint $table) {
            $table->comment = '操作日志表';
            $table->increments('id')->comment('ID');
            $table->string('url',100)->default('')->comment('操作路径');
            $table->string('methods',10)->default('')->comment('请求方式');
            $table->string('name',100)->default('')->comment('操作名称');
            $table->string('ip',50)->default('')->comment('操作ip');
            $table->integer('admin_id')->comment('操作管理员id');
            $table->tinyInteger('status')->default(1)->comment('状态:0=操作失败,1=操作成功');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('operation_logs');
    }
}
